import pytest,logging
from Page.Page import Page
from Page.Page2 import Page2
from Tools.Tools import log
from selenium import webdriver

@pytest.fixture
def driver():
    driver = webdriver.Edge()
    log()
    yield driver
    driver.quit()

def test_01(driver):
    try:
        logging.info("开始执行用例")
        po = Page(driver)
        po.luoji_01()
    except Exception as e:
        print(e)


def test_02(driver):
    try:
        logging.info("开始执行用例")
        po = Page2(driver)
        po.luoji_01()
        po.luoji_02()
    except Exception as p:
        print(p)

if __name__ == '__main__':
    pytest.main(['-s'])